1. Field of the Invention
The present invention relates to a variable-length data alignment apparatus for generating bit sequence data used in a digital video encoder.
2. Description of the Prior Art
In digital video coding, the video signal is compressed and transferred as a bit stream of a specific syntax conforming to, for example, Recommendation H.261 ("Video Codec for Audiovisual Service at p.times.64 kbit/s", a CCITT Subgroup XV Document in Report R37 of Study Group XV of the International Telegraph and Telephone Consultative Committee, August 1990) or MPEG-1 (ISO MPEG Document "CD 11172--Coding of Moving Pictures and Associated Audio for Digital Storage Media at up to about 1.5 Mbps" based on ISO-IEC/JTCI/SC2/WG8, International Organization for Standardization, 1992). In these coders, coding algorithms resulting in data loss based on a discrete cosine transformation (DCT) precede lossless encoders based on variable length coding and bit stream syntax formatting. The input to a loss-free coder (known as a variable length coder or VLC) typically comprises the transform coefficient for a macro-block of video data (16.times.16 in MPEG-1), secondary data related to the macro-block (macro-block type, movement vectors, etc. in MPEG-1), and secondary data of the header corresponding to a slice, picture, or more fragmented part of the coded video data.
One function of the variable length coder is to convert the fixed-length in put data to variable length data. This can be achieved, for example, by run level coding the AC transform coefficient, and entropy coding various run level combinations. VLC can execute entropy coding of plural secondary data. Another VLC function is to format (reorder) the data to match the output bit stream syntax. Delta modulation and other additional coding can also be applied to a number of signals (e.g., DC coefficient and motion vectors in MPEG-1).
Existing loss-free coders support a subset of the existing standards so that there is no possibility of changing the bit stream syntax. An example of such an apparatus is LSI Logic L64750 (see LSI Logic Integrated Circuit Data Sheet L645750/51, "CCITT Variable length Coder/Decoder," April 1991, Order Number 44023), which only supports the H.261 bit stream syntax.
A versatile VLC, however, should support both existing standards (such as H.261 and MPEG-1) and new extensions to existing standards, including MPEG-2 proposed by Matsushita Electric Industrial Co., Ltd. in the ISO WG11 Document "Matsushita Proposal Description for MPEG-II" based on ISO/IEC-JTC1/SC29/WG11, MPEG91/217, International Organization for Standardization, 1991. There are, however, several problems that must be overcome in realizing such a versatile VLC.
1. Formatting is, in general extremely complex, affected by the bit stream syntax and coding algorithm and by the characteristics of the coding data. PA1 2. Data throughput is extremely high. In the case of wide screen television sampled at 4:1:1, each macro-block must be coded in 15 microseconds. The input rate of fixed length data to the VLC exceeds 27 MHz in this case. PA1 3. The VLC must be modular. Formatting bit stream syntaxes that are unlikely to change can be achieved by a dedicated logic circuit of minimum size. The aspects of the bitstream which are not likely to change should be implemented with minimum size dedicated logic. The aspects of the syntax which are likely to change should be implemented by versatile programmable hardware.